package com.xuetang9.cloud.house.news.web;

import com.xuetang9.cloud.house.domain.entity.News;
import com.xuetang9.cloud.house.domain.entity.NewsComment;
import com.xuetang9.cloud.house.domain.entity.NewsTag;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Controller
public class NewsController {

    // 默认方式显示
    @RequestMapping("latest-news.html")
    public String latestNews(ModelMap modelMap){

        /* 1.新闻信息*/
        List<News> newsList = new ArrayList<>();

        // 第1个数据
        News new1 = new News();
        new1.setTitle("房产大降价");
        new1.setDate(new Date());
        new1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new1);

        // 第2个数据
        News new2 = new News();
        new2.setTitle("武侯区楼盘新售");
        new2.setDate(new Date());
        new2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new2);

        // 第3个数据
        News new3 = new News();
        new3.setTitle("国家发布新的房地产条例3");
        new3.setDate(new Date());
        new3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new3);

        // 第4个数据
        News new4 = new News();
        new4.setTitle("国家发布新的房地产条例4");
        new4.setDate(new Date());
        new4.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new4);

        // 第5个数据
        News new5 = new News();
        new5.setTitle("国家发布新的房地产条例5");
        new5.setDate(new Date());
        new5.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new5);

        // 第6个数据
        News new6 = new News();
        new6.setTitle("国家发布新的房地产条例6");
        new6.setDate(new Date());
        new6.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new6);

        // 第7个数据
        News new7 = new News();
        new7.setTitle("国家发布新的房地产条例7");
        new7.setDate(new Date());
        new7.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new7);

        // 第8个数据
        News new8 = new News();
        new8.setTitle("国家发布新的房地产条例8");
        new8.setDate(new Date());
        new8.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new8);

        // 第9个数据
        News new9 = new News();
        new9.setTitle("国家发布新的房地产条例9");
        new9.setDate(new Date());
        new9.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new9);

        modelMap.put("news",newsList); // 房产新闻信息

        return "latest-news";
    }


    // 左倾式
    @RequestMapping("news-left-sidebar.html")
    public String newsLeftSidebar(ModelMap modelMap){

        /* 1.新闻信息*/
        List<News> newsList = new ArrayList<>();

        // 第1个数据
        News new1 = new News();
        new1.setTitle("房产大降价");
        new1.setDate(new Date());
        new1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new1);

        // 第2个数据
        News new2 = new News();
        new2.setTitle("武侯区楼盘新售");
        new2.setDate(new Date());
        new2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new2);

        // 第3个数据
        News new3 = new News();
        new3.setTitle("国家发布新的房地产条例3");
        new3.setDate(new Date());
        new3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new3);

        // 第4个数据
        News new4 = new News();
        new4.setTitle("国家发布新的房地产条例4");
        new4.setDate(new Date());
        new4.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new4);

        // 第5个数据
        News new5 = new News();
        new5.setTitle("国家发布新的房地产条例5");
        new5.setDate(new Date());
        new5.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new5);

        // 第6个数据
        News new6 = new News();
        new6.setTitle("国家发布新的房地产条例6");
        new6.setDate(new Date());
        new6.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new6);

        // 第7个数据
        News new7 = new News();
        new7.setTitle("国家发布新的房地产条例7");
        new7.setDate(new Date());
        new7.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new7);

        // 第8个数据
        News new8 = new News();
        new8.setTitle("国家发布新的房地产条例8");
        new8.setDate(new Date());
        new8.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new8);

        /* 2.侧边热点新闻信息*/
        List<News> popularNewsList = new ArrayList<>();

        // 第1个数据
        News popularNew1 = new News();
        popularNew1.setTitle("房产大降价");
        popularNew1.setDate(new Date());
        popularNew1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew1);

        // 第2个数据
        News popularNew2 = new News();
        popularNew2.setTitle("武侯区楼盘新售");
        popularNew2.setDate(new Date());
        popularNew2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew2);

        // 第3个数据
        News popularNew3 = new News();
        popularNew3.setTitle("国家发布新的房地产条例3");
        popularNew3.setDate(new Date());
        popularNew3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew3);

        /* 3.侧边分类信息*/
        List<NewsTag> newsTags = new ArrayList<>();

        // 第1个分类
        NewsTag newsTag1 = new NewsTag();
        newsTag1.setTagName("Houses");
        newsTags.add(newsTag1);

        // 第2个分类
        NewsTag newsTag2 = new NewsTag();
        newsTag2.setTagName("Real Home");
        newsTags.add(newsTag2);

        // 第3个分类
        NewsTag newsTag3 = new NewsTag();
        newsTag3.setTagName("Garages");
        newsTags.add(newsTag3);

        // 第4个分类
        NewsTag newsTag4 = new NewsTag();
        newsTag4.setTagName("Real Estates");
        newsTags.add(newsTag4);

        // 第5个分类
        NewsTag newsTag5 = new NewsTag();
        newsTag5.setTagName("Properties");
        newsTags.add(newsTag5);

        // 第6个分类
        NewsTag newsTag6 = new NewsTag();
        newsTag6.setTagName("Family House");
        newsTags.add(newsTag6);

        modelMap.put("newsLeftSidebar",newsList);  // 左倾式新闻信息
        modelMap.put("popularNewsList",popularNewsList); //热点新闻信息
        modelMap.put("newsTags",newsTags);  //新闻标签和类型

        return "news-left-sidebar";
    }

    // 右倾式
    @RequestMapping("news-right-sidebar.html")
    public String newsRightSidebar(ModelMap modelMap){

        /* 1.新闻信息*/
        List<News> newsList = new ArrayList<>();

        // 第1个数据
        News new1 = new News();
        new1.setTitle("房产大降价");
        new1.setDate(new Date());
        new1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new1);

        // 第2个数据
        News new2 = new News();
        new2.setTitle("武侯区楼盘新售");
        new2.setDate(new Date());
        new2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new2);

        // 第3个数据
        News new3 = new News();
        new3.setTitle("国家发布新的房地产条例3");
        new3.setDate(new Date());
        new3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new3);

        // 第4个数据
        News new4 = new News();
        new4.setTitle("国家发布新的房地产条例4");
        new4.setDate(new Date());
        new4.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new4);

        // 第5个数据
        News new5 = new News();
        new5.setTitle("国家发布新的房地产条例5");
        new5.setDate(new Date());
        new5.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new5);

        // 第6个数据
        News new6 = new News();
        new6.setTitle("国家发布新的房地产条例6");
        new6.setDate(new Date());
        new6.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new6);

        // 第7个数据
        News new7 = new News();
        new7.setTitle("国家发布新的房地产条例7");
        new7.setDate(new Date());
        new7.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new7);

        // 第8个数据
        News new8 = new News();
        new8.setTitle("国家发布新的房地产条例8");
        new8.setDate(new Date());
        new8.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new8);

        /* 1.热点新闻信息*/
        List<News> popularNewsList = new ArrayList<>();

        // 第1个数据
        News popularNew1 = new News();
        popularNew1.setTitle("房产大降价");
        popularNew1.setDate(new Date());
        popularNew1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew1);

        // 第2个数据
        News popularNew2 = new News();
        popularNew2.setTitle("武侯区楼盘新售");
        popularNew2.setDate(new Date());
        popularNew2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew2);

        // 第3个数据
        News popularNew3 = new News();
        popularNew3.setTitle("国家发布新的房地产条例3");
        popularNew3.setDate(new Date());
        popularNew3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew3);

        /* 3.侧边分类信息*/
        List<NewsTag> newsTags = new ArrayList<>();

        // 第1个分类
        NewsTag newsTag1 = new NewsTag();
        newsTag1.setTagName("Houses");
        newsTags.add(newsTag1);

        // 第2个分类
        NewsTag newsTag2 = new NewsTag();
        newsTag2.setTagName("Real Home");
        newsTags.add(newsTag2);

        // 第3个分类
        NewsTag newsTag3 = new NewsTag();
        newsTag3.setTagName("Garages");
        newsTags.add(newsTag3);

        // 第4个分类
        NewsTag newsTag4 = new NewsTag();
        newsTag4.setTagName("Real Estates");
        newsTags.add(newsTag4);

        // 第5个分类
        NewsTag newsTag5 = new NewsTag();
        newsTag5.setTagName("Properties");
        newsTags.add(newsTag5);

        // 第6个分类
        NewsTag newsTag6 = new NewsTag();
        newsTag6.setTagName("Family House");
        newsTags.add(newsTag6);


        modelMap.put("newsRightSidebar",newsList);  // 右倾式新闻信息
        modelMap.put("popularNewsList2",popularNewsList); // 热点新闻信息
        modelMap.put("newsTags",newsTags); //新闻类型和标签

        return "news-right-sidebar";
    }

    // 单行阶梯式
    @RequestMapping("news-carousel.html")
    public String newsCarousel(ModelMap modelMap){

        /* 1.新闻信息*/
        List<News> newsList = new ArrayList<>();

        // 第1个数据
        News new1 = new News();
        new1.setTitle("房产大降价");
        new1.setDate(new Date());
        new1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new1);

        // 第2个数据
        News new2 = new News();
        new2.setTitle("武侯区楼盘新售");
        new2.setDate(new Date());
        new2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new2);

        // 第3个数据
        News new3 = new News();
        new3.setTitle("国家发布新的房地产条例3");
        new3.setDate(new Date());
        new3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new3);

        // 第4个数据
        News new4 = new News();
        new4.setTitle("国家发布新的房地产条例4");
        new4.setDate(new Date());
        new4.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new4);

        // 第5个数据
        News new5 = new News();
        new5.setTitle("国家发布新的房地产条例5");
        new5.setDate(new Date());
        new5.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new5);

        // 第6个数据
        News new6 = new News();
        new6.setTitle("国家发布新的房地产条例6");
        new6.setDate(new Date());
        new6.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new6);

        // 第7个数据
        News new7 = new News();
        new7.setTitle("国家发布新的房地产条例7");
        new7.setDate(new Date());
        new7.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new7);

        // 第8个数据
        News new8 = new News();
        new8.setTitle("国家发布新的房地产条例8");
        new8.setDate(new Date());
        new8.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new8);


        modelMap.put("newsCarouselOne",newsList);  // 单行阶梯式房产新闻信息

        return "news-carousel";
    }

    // 双行阶梯式
    @RequestMapping("news-carousel2.html")
    public String newsCarousel2(ModelMap modelMap){

        /* 1.新闻信息*/
        List<News> newsList = new ArrayList<>();

        // 第1个数据
        News new1 = new News();
        new1.setTitle("房产大降价");
        new1.setDate(new Date());
        new1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new1);

        // 第2个数据
        News new2 = new News();
        new2.setTitle("武侯区楼盘新售");
        new2.setDate(new Date());
        new2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new2);

        // 第3个数据
        News new3 = new News();
        new3.setTitle("国家发布新的房地产条例3");
        new3.setDate(new Date());
        new3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new3);

        // 第4个数据
        News new4 = new News();
        new4.setTitle("国家发布新的房地产条例4");
        new4.setDate(new Date());
        new4.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new4);

        // 第5个数据
        News new5 = new News();
        new5.setTitle("国家发布新的房地产条例5");
        new5.setDate(new Date());
        new5.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new5);

        // 第6个数据
        News new6 = new News();
        new6.setTitle("国家发布新的房地产条例6");
        new6.setDate(new Date());
        new6.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new6);

        // 第7个数据
        News new7 = new News();
        new7.setTitle("国家发布新的房地产条例7");
        new7.setDate(new Date());
        new7.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new7);

        // 第8个数据
        News new8 = new News();
        new8.setTitle("国家发布新的房地产条例8");
        new8.setDate(new Date());
        new8.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        newsList.add(new8);

        modelMap.put("newsCarouselTwo",newsList);  // 双行阶梯式新闻信息

        return "news-carousel2";
    }

    // 详情左倾式
    @RequestMapping("news-details.html")
    public String newsDetails(ModelMap modelMap){

        /* 1.新闻信息*/

        // 新闻详情数据
        News new1 = new News();
        new1.setTitle("房产大降价");
        new1.setDate(new Date());
        new1.setContent("Some of our customer say’s that they trust us and buy our product without any gitation because they can Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem\n" +
                "\n" +
                "Some of our customer say’s that they trust us and buy our product without any gitation because they can Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur");

        /* 2.侧边热点新闻信息*/
        List<News> popularNewsList = new ArrayList<>();

        // 第1个数据
        News popularNew1 = new News();
        popularNew1.setTitle("房产大降价");
        popularNew1.setDate(new Date());
        popularNew1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew1);

        // 第2个数据
        News popularNew2 = new News();
        popularNew2.setTitle("武侯区楼盘新售");
        popularNew2.setDate(new Date());
        popularNew2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew2);

        // 第3个数据
        News popularNew3 = new News();
        popularNew3.setTitle("国家发布新的房地产条例3");
        popularNew3.setDate(new Date());
        popularNew3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew3);

        /* 3.侧边分类信息*/
        List<NewsTag> newsTags = new ArrayList<>();

        // 第1个分类
        NewsTag newsTag1 = new NewsTag();
        newsTag1.setTagName("Houses");
        newsTags.add(newsTag1);

        // 第2个分类
        NewsTag newsTag2 = new NewsTag();
        newsTag2.setTagName("Real Home");
        newsTags.add(newsTag2);

        // 第3个分类
        NewsTag newsTag3 = new NewsTag();
        newsTag3.setTagName("Garages");
        newsTags.add(newsTag3);

        // 第4个分类
        NewsTag newsTag4 = new NewsTag();
        newsTag4.setTagName("Real Estates");
        newsTags.add(newsTag4);

        // 第5个分类
        NewsTag newsTag5 = new NewsTag();
        newsTag5.setTagName("Properties");
        newsTags.add(newsTag5);

        // 第6个分类
        NewsTag newsTag6 = new NewsTag();
        newsTag6.setTagName("Family House");
        newsTags.add(newsTag6);

        /* 4.评论信息*/
        List<NewsComment> newsComments = new ArrayList<>();

        // 第一个评论
        NewsComment newsComment1 = new NewsComment();
        newsComment1.setUserId(1L);  // 评论人的ID
        newsComment1.setNewsId(1L);  // 对应新闻的ID
        newsComment1.setDate(new Date()); // 评论的时间
        // 评论的内容
        newsComment1.setContent("But I must explain to you how all this mistaken idea of denouncing pleasure and ising pain borand I will give you a complete account of the system");
        newsComments.add(newsComment1);

        // 第二个评论
        NewsComment newsComment2 = new NewsComment();
        newsComment2.setUserId(2L);  // 评论人的ID
        newsComment2.setNewsId(2L);  // 对应新闻的ID
        newsComment2.setDate(new Date()); // 评论的时间
        // 评论的内容
        newsComment2.setContent("But I must explain to you how all this mistaken idea of denouncing pleasure and ising pain borand I will give you a complete account of the system");
        newsComments.add(newsComment1);

        // 第三个评论
        NewsComment newsComment3 = new NewsComment();
        newsComment3.setUserId(3L);  // 评论人的ID
        newsComment3.setNewsId(3L);  // 对应新闻的ID
        newsComment3.setDate(new Date()); // 评论的时间
        // 评论的内容
        newsComment3.setContent("But I must explain to you how all this mistaken idea of denouncing pleasure and ising pain borand I will give you a complete account of the system");
        newsComments.add(newsComment1);


        modelMap.put("newsDetails",new1);  // 新闻详情信息
        modelMap.put("popularNewsList3",popularNewsList);  //热点新闻信息
        modelMap.put("newsComments",newsComments);  // 评论信息(暂未放入页面中，需要sql完成)
        modelMap.put("newsTags",newsTags);  //新闻类型和标签

        return "news-details";
    }

    // 详情右倾式
    @RequestMapping("news-details-right-sidebar.html")
    public String newsDetailsRightSidebar(ModelMap modelMap){

        /* 1.新闻信息*/

        // 新闻详情数据
        News new1 = new News();
        new1.setTitle("房产大降价");
        new1.setDate(new Date());
        new1.setContent("Some of our customer say’s that they trust us and buy our product without any gitation because they can Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem\n" +
                "\n" +
                "Some of our customer say’s that they trust us and buy our product without any gitation because they can Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur");

        /* 2.侧边热点新闻信息*/
        List<News> popularNewsList = new ArrayList<>();

        // 第1个数据
        News popularNew1 = new News();
        popularNew1.setTitle("房产大降价");
        popularNew1.setDate(new Date());
        popularNew1.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew1);

        // 第2个数据
        News popularNew2 = new News();
        popularNew2.setTitle("武侯区楼盘新售");
        popularNew2.setDate(new Date());
        popularNew2.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew2);

        // 第3个数据
        News popularNew3 = new News();
        popularNew3.setTitle("国家发布新的房地产条例3");
        popularNew3.setDate(new Date());
        popularNew3.setContent("房产交易平台the best theme for elit, sed do to eiumod tempor dolor sit amet, ctetur adipiscing elit sed do.");
        popularNewsList.add(popularNew3);

        /* 3.侧边分类信息*/
        List<NewsTag> newsTags = new ArrayList<>();

        // 第1个分类
        NewsTag newsTag1 = new NewsTag();
        newsTag1.setTagName("Houses");
        newsTags.add(newsTag1);

        // 第2个分类
        NewsTag newsTag2 = new NewsTag();
        newsTag2.setTagName("Real Home");
        newsTags.add(newsTag2);

        // 第3个分类
        NewsTag newsTag3 = new NewsTag();
        newsTag3.setTagName("Garages");
        newsTags.add(newsTag3);

        // 第4个分类
        NewsTag newsTag4 = new NewsTag();
        newsTag4.setTagName("Real Estates");
        newsTags.add(newsTag4);

        // 第5个分类
        NewsTag newsTag5 = new NewsTag();
        newsTag5.setTagName("Properties");
        newsTags.add(newsTag5);

        // 第6个分类
        NewsTag newsTag6 = new NewsTag();
        newsTag6.setTagName("Family House");
        newsTags.add(newsTag6);

        /* 4.评论信息*/
        List<NewsComment> newsComments = new ArrayList<>();

        // 第一个评论
        NewsComment newsComment1 = new NewsComment();
        newsComment1.setUserId(1L);  // 评论人的ID
        newsComment1.setNewsId(1L);  // 对应新闻的ID
        newsComment1.setDate(new Date()); // 评论的时间
        // 评论的内容
        newsComment1.setContent("But I must explain to you how all this mistaken idea of denouncing pleasure and ising pain borand I will give you a complete account of the system");
        newsComments.add(newsComment1);

        // 第二个评论
        NewsComment newsComment2 = new NewsComment();
        newsComment2.setUserId(2L);  // 评论人的ID
        newsComment2.setNewsId(2L);  // 对应新闻的ID
        newsComment2.setDate(new Date()); // 评论的时间
        // 评论的内容
        newsComment2.setContent("But I must explain to you how all this mistaken idea of denouncing pleasure and ising pain borand I will give you a complete account of the system");
        newsComments.add(newsComment1);

        // 第三个评论
        NewsComment newsComment3 = new NewsComment();
        newsComment3.setUserId(3L);  // 评论人的ID
        newsComment3.setNewsId(3L);  // 对应新闻的ID
        newsComment3.setDate(new Date()); // 评论的时间
        // 评论的内容
        newsComment3.setContent("But I must explain to you how all this mistaken idea of denouncing pleasure and ising pain borand I will give you a complete account of the system");
        newsComments.add(newsComment1);


        modelMap.put("newsDetails",new1);   //新闻详情信息
        modelMap.put("popularNewsList3",popularNewsList);  //热点新闻信息
        modelMap.put("newsComments",newsComments);  //评论信息
        modelMap.put("newsTags",newsTags);  //新闻类型和标签

        return "news-details-right-sidebar";
    }
}
